﻿using System;
using LaserTag.Module.MediaKit.Views;
using LaserTag.Module.MediaKit.Controllers;
using LaserTag.Module.MediaKit.ViewModels;
using LaserTag.Module.MediaKit.Views;
using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Unity;

namespace LaserTag.Module.MediaKit
{
    public class MediaKitModule : IModule
    {
        private readonly IUnityContainer m_container;

        public MediaKitModule(IUnityContainer container)
        {
            m_container = container;
        }

        #region IModule Members

        public void Initialize()
        {
            m_container.RegisterType<IVideoCaptureViewModel, VideoCaptureViewModel>();
            m_container.RegisterType<IVideoCaptureView, VideoCaptureView>();
            m_container.RegisterType<IMediaKitController, MediaKitController>();
            m_container.Resolve<IMediaKitController>().Run();
        }

        #endregion
    }
}
